<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function check(form){
	if(form.name.value==""){
		alert("请输入课程名称！");
		return false;
	}
	return true;
}
</script>
</head>
<body>
<br><br><br>
<form action="savaPaper.do" method="post" onsubmit="return check(this)">
<input name="id" value="${paper.id }" type="hidden">
<table>
<tr><td colspan="2">添加套题信息</td></tr>
<tr>
	<td>套题名称</td>
	<td><input name="name" value="${paper.name }"></td>
</tr>
<tr>
	<td>课程</td>
	<td>
		<select name="lId">
		<c:forEach items="${lessons }" var="l">
		<c:if test="${l.id==paper.lesson.id }">
			<option value="${l.id }" selected="selected">${l.name }</option>
		</c:if>
		<c:if test="${l.id!=paper.lesson.id }">
			<option value="${l.id }">${l.name }</option>
		</c:if>
		</c:forEach>
		</select>
	</td>
</tr>
<tr>
	<td><input type="submit" value="保存"/></td>
	<td><input type="reset" value="取消"/></td>
</tr>
</table>
</form>
</body>
</html>